home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / graphics / rotor20.zip / ROTOR20.SCR < prev   
Text File  |  1993-07-09  |  10KB  |  414 lines

  1.  
  2. . =========================================
  3. . R O T O R   S C R I P T
  4. . =========================================
  5. . Copyright 1991..1993     by Michel Robert
  6. . version date:                  12/15/1992
  7.  
  8.  
  9. . -----------------------------------------
  10. . debugging reports - disabled by .
  11. . -----------------------------------------
  12. . report    file        ON
  13. . report    macrolist   On
  14. . report    proclist    ON
  15. . report    cmdlist     On
  16. . report    DO_calls    On
  17.  
  18. . For execution traces, breaks and watches
  19. . use DEBUG  SHOW, PAUSE, MESSAGE.
  20.  
  21.  
  22. . -----------------------------------------
  23. . configuration section
  24. . -----------------------------------------
  25. . clean intro
  26.   switch    SHAPE       OFF
  27.   switch    CURSOR      OFF  square
  28.   beep
  29. . message   Press ENTER to start
  30.  
  31.  
  32. . -----------------------------------------
  33. . RESET macro - foreground
  34. . -----------------------------------------
  35. . Use this to return curranet object to
  36. . start-up defaults
  37.  
  38.   macro Reset
  39.   defaults
  40.   update
  41.   option    mouse on
  42.   done
  43.   end
  44.  
  45. . -----------------------------------------
  46. . PAINT macro - foreground
  47. . -----------------------------------------
  48. . Set-up ROTOR for painting
  49.  
  50.   macro Paint
  51.   switch    shape     off
  52.   switch    cursor    off
  53.   size      zone      workarea
  54.   switch    zone      off
  55.   update
  56.   option    mouse on
  57.   menu      status
  58.   menu      icon
  59.   done
  60.   end
  61.  
  62. . -----------------------------------------
  63. . BORDER macro - foreground
  64. . -----------------------------------------
  65. . Uses current shape to draw a fitted border
  66.  
  67.   procedure borderstep
  68.   cycle     1
  69.   stamp
  70.   end
  71.  
  72.   macro     border
  73.   switch    SHAPE       OFF
  74.   duplicate
  75.   size      zone        fitted
  76.   switch    SHAPE       ON
  77.   switch    ZONE        OFF
  78. . switch    ROLL        ON   sync        0
  79.   switch    VEER        OFF  nc          270
  80.   switch    GO          ON   edge
  81.   position  cursor      TL
  82.   move      cursor      up               1
  83.   update
  84.   do        borderstep    until          TL
  85.   kill
  86.   switch    SHAPE       ON
  87.   done
  88.   end
  89.  
  90. . -----------------------------------------
  91. . CORNERS macro - foreground
  92. . -----------------------------------------
  93. . Stamps current shape in all 4 corners of
  94. . its zone
  95.  
  96.   macro     corners
  97.   switch    SHAPE       OFF
  98.   duplicate
  99.   switch    JOIN        OFF
  100.   switch    SHAPE       ON
  101.   switch    FILL        ON   opaque
  102.   switch    TILT        ON
  103.   dec       shape_tilt       45
  104.   position  cursor      TL
  105.   update
  106.   stamp
  107.   inc       shape_tilt       90
  108.   position  cursor      TR
  109.   update
  110.   stamp
  111.   inc       shape_tilt       90
  112.   position  cursor      BR
  113.   update
  114.   stamp
  115.   inc       shape_tilt       90
  116.   position  cursor      BL
  117.   update
  118.   stamp
  119.   inc       shape_tilt       135
  120.   kill
  121.   switch    SHAPE       ON
  122.   update
  123.   done
  124.   end
  125.  
  126. . -----------------------------------------
  127. . SHADOWED macro - background
  128. . -----------------------------------------
  129. . For shapes with a shadow.
  130. . Only works if DRAW isON
  131.  
  132.   macro     Shadowed
  133.   if        [PAUSE] or NOT'[DRAW]  do exit
  134.   duplicate
  135.   switch    shape       on
  136.   switch    fill        on   nc  0
  137.   switch    line        off
  138.   switch    go          off  exit
  139.   switch    pave        off
  140. . this specifies shadow offset
  141.   moveby    cursor      15      15
  142.   update
  143.   stamp
  144.   kill
  145.   end
  146.  
  147. . -----------------------------------------
  148. . SPIROGRAPH macro - setup
  149. . -----------------------------------------
  150. . Adjust roll, tilt, and offset to customize
  151.  
  152.   macro     Spirograph
  153.   switch    cursor   OFF
  154.   position  cursor   center
  155.   size      cursor   to_WAreaH
  156.   size      cursor   Halved
  157.   pulse     Shrink   OFF
  158.   switch    Shape    OFF      polygon     1
  159.   switch    Join     ON
  160.   switch    Roll     ON       regular
  161.   pulse     Roll     ON       upward      7
  162.   switch    Tilt     ON
  163.   pulse     Tilt     ON       upward      8
  164.   switch    offset   ON       nc          %cursor_rad%
  165.   size      cursor   to_WAreaH
  166.   dec       cursor_rad        30
  167.   update
  168.   switch    draw     ON
  169.   option    mouse    off
  170.   menu      pose
  171.   done
  172.   end
  173.  
  174. . -----------------------------------------
  175. . UNMATCH_COLORS macro - background
  176. . -----------------------------------------
  177. . Guarantees different line and fill colors
  178. . when FILL is ON
  179.  
  180.   procedure next_linecolor
  181.   inc       line_color
  182.   end
  183.  
  184.   macro     Unmatch_colors
  185.   if        [FILL] and %line_color%=%fill_color% do next_linecolor
  186.   update
  187.   end
  188.  
  189.  
  190. . -----------------------------------------
  191. . simple macros - foreground
  192. . -----------------------------------------
  193.  
  194. . Flying bird demo
  195.   macro     Bird
  196.   defaults
  197.   switch    SHAPE       ON  bird  1
  198.   pulse     SHAPE       ON  upward   1
  199.   switch    GO          ON  thru     15
  200.   switch    ROLL        OFF
  201.   switch    CURSOR      OFF
  202.   set       line_color  6
  203.   position  cursor      left
  204.   move      cursor      right
  205.   set       cursor_rad  70
  206.   set       shrinkage   %cursor_rad%
  207.   update
  208.   done
  209.   end
  210.  
  211. . disable/enable mouse
  212.   macro     Mouse~
  213.   option    MOUSE  toggle
  214.   done
  215.   end
  216.  
  217. . Old ROTOR toggle
  218.   macro     Rotor~
  219.   pulse     ROLL        TOGGLE
  220. . switch    ROLL        [ROLL]
  221.   update
  222.   done
  223.   end
  224.  
  225. . Old PULSE toggle
  226.   macro     Pulse~
  227.   pulse     SHRINK      toggle
  228.   update
  229.   done
  230.   end
  231.  
  232. . Synchronized ROTOR and PULSE toggles
  233.   macro     Vortex~
  234.   pulse     SHRINK      toggle      nc
  235.   pulse     ROLL        [~SHRINK]
  236.   update
  237.   done
  238.   end
  239.  
  240. . -----------------------------------------
  241. . simple macros - background
  242. . -----------------------------------------
  243.  
  244.  
  245. . Wiping motion
  246.   macro     Wipe
  247.   if        [PAUSE] or NOT'[ROLL] or [~ROLL]  do exit
  248.   set       count      360
  249.   dec       count         %global_tilt%
  250.   set       global_tilt   %count%
  251.   update
  252.   end
  253.  
  254. . Alternating TILT
  255.   macro     tilt_Notilt
  256.   if        [PAUSE]     do exit
  257.   switch    TILT        toggle
  258.   end
  259.  
  260. . Motion special FX
  261.   macro     crenelled-pave
  262.   if        [PAUSE]     do exit
  263.   switch    PAVE        ON
  264.   switch    GO          ON
  265.   update
  266.   move      cursor     dec90
  267.   cycle 2
  268.   move      cursor     inc90
  269.   cycle 2
  270.   move      cursor     inc90
  271.   cycle 2
  272.   move      cursor     dec90
  273.   cycle 1
  274.   end
  275.  
  276.  
  277. . -----------------------------------------
  278. . MAIN macro: the introductory demo
  279. . part 1    : subroutine procedures
  280. . -----------------------------------------
  281.  
  282.   procedure start
  283.   option    MOUSE       OFF
  284.   option    ANIMFILL    OFF
  285.   switch    CURSOR      OFF  square       0
  286.   switch    SHAPE       OFF  symbols      1
  287.   switch    TILT        OFF  nc           0
  288.   pulse     ROLL        ON   upward      30
  289.   switch    CURSOR      OFF  square      13 
  290.   update
  291.   switch    PAVE        ON
  292.   size      ZONE        Fitted
  293.   switch    CURSOR      OFF  NC           0
  294.   position  cursor      center
  295.   size      cursor      to_ZoneH
  296.   switch    SHAPE       ON   symbols      1
  297.   size      shape       dotsize
  298.   switch    LINE        ON   apex         3
  299.   switch    GO          OFF
  300.   switch    FILL        OFF  opaque       0
  301.   pulse     ROLL        ON   upward      30
  302.   pulse     SHRINK      ON   up&down      8
  303.   param     global_tilt 0
  304.   set       count       1
  305.   switch    DRAW        ON
  306.   update
  307.   end
  308.  
  309.  
  310.   procedure waitforlevel
  311.   pulse     SHRINK      NOT'ON
  312.   end
  313.  
  314.  
  315.   procedure beginloop
  316.   switch    ROLL        OFF
  317.   update
  318.   cycle    1
  319.   switch    DRAW        ON
  320.   position  cursor      center
  321.   switch    SHAPE       ON   symbols     1
  322.   switch    LINE        ON   apex        3
  323.   switch    FILL        OFF
  324.   size      shape       fullsize
  325.   pulse     SHRINK      ON   upward
  326.   update
  327.   cycle    1
  328.   set       phase       3
  329.   end
  330.  
  331.  
  332.   procedure expand
  333.   switch    LINE        ON   solid        3
  334.   switch    FILL        ON   opaque       0
  335.   pulse     SHRINK      ON   downward
  336.   update
  337.   end
  338.  
  339.  
  340.   procedure edgeaction
  341.   pulse     SHRINK      OFF
  342.   cycle    1
  343. . edge action setup
  344.   inc       shape_tilt       30
  345.   set       global_tilt 0
  346.   switch    TILT        ON
  347.   switch    CURSOR      OFF  square      13
  348.   switch    FILL        ON
  349.   switch    GO          ON   edge
  350.   switch    LINE        ON   solid       14
  351.   switch    PAVE        ON   fixed
  352.   switch    SHAPE       ON   symbols     6 
  353.   switch    VEER        OFF  nc         270
  354.   pulse     ROLL        ON
  355.   position  cursor      TL
  356.   move      cursor      right
  357.   update
  358.   cycle     1
  359.   end
  360.  
  361.  
  362.   procedure shrink
  363. . message   Now shrinking
  364.   position  cursor      center
  365.   size      cursor      to_ZoneH
  366.   switch    TILT        OFF
  367.   switch    LINE        OFF  solid        4
  368.   switch    GO          OFF
  369.   switch    FILL        OFF
  370.   pulse     SHRINK      ON   upward
  371.   switch    SHAPE       ON   symbols      1
  372.   pulse     ROLL        OFF
  373.   size      shape       fullsize
  374.   update
  375.   cycle     1
  376. . message   Shrinking complete
  377.   end
  378.  
  379.  
  380. . determines start-up setup after demo
  381.   procedure exitmain
  382.   defaults
  383.   size      zone        workarea
  384.   menu      Objects
  385.   position  cursor      center
  386.   update
  387.   delete    workarea
  388.   option    MOUSE       ON
  389. . option    ANIMFILL    ON
  390.   done
  391.   end
  392.  
  393.  
  394. . -----------------------------------------
  395. . MAIN macro: the introductory demo
  396. . part 2    : macro body
  397. . -----------------------------------------
  398. . Macro named MAIN is automatically started
  399. . by rotor.
  400. . %phase%=0 standard initialization
  401.  
  402.   macro   main
  403.   when    %phase%=0              do start
  404.   when    %phase%=1 and fullsize do waitforlevel
  405.   when    %phase%=2 and level    do beginloop
  406.   when    %phase%=3 and dotsize  do expand
  407.   when    %phase%=4 and fullsize do edgeaction
  408.   when    %phase%=5 and TL       do shrink
  409.   when    %phase%>5 and dotsize  do beginloop
  410.   if      keypress               do exitmain
  411.   end
  412.  
  413.  
  414.